<template>
    <div class="info-card flex">
        <img :src="data.imgSrc" alt="信息卡片图片" class="info-card__img">
        <section class="info-card__details">
            <!-- <h2 class="info-card__title">{{ data.title }}</h2> -->
             {{ data.title }}
        </section>
    </div> 
</template>

<script setup>
import {defineProps} from 'vue'
const props = defineProps({
    data:Object
})
</script>

<style lang="scss" scoped>
@function pxToRem($px){
    $baseWidth : 1440px ;
    @return #{($px*100)/$baseWidth}rem;
}
.info-card{
    width: pxToRem(300px);
    height: pxToRem(150px);
    border-radius: 20px;
    background-color: #e3f9fd;
    justify-content: space-around;
    box-shadow: 0 0 pxToRem(5px) rgba($color: #000000, $alpha: 0.3);
    &__img{
        width: pxToRem(100px);
        height: pxToRem(100px);
        object-fit: cover;
        border-radius: 10px;
    }

    &__details{
        width: pxToRem(100px);
    }
}
</style>